<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link href="../../css/mui.min.css" rel="stylesheet" />
    <link href="../../css/app/bunsorder/bunsorder.css" rel="stylesheet" />
    <script type="text/javascript" src="../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../js/jquery-3.2.1.min.js"></script>
    <script type="text/javascript" src="../../js/app/common.js" ></script>
    <script type="text/javascript" src="../../js/mui.min.js"></script>
    <link rel="stylesheet" href="../../css/muiloading.css" />
    <script type="text/javascript" src="../../js/mui-loading.js" ></script>
</head>
<body>
<header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left a-back"></a>
    <h1 class="mui-title">我的订单</h1>
</header>
<div class="mui-content"  id="orders" v-cloak>

    <!--下拉刷新容器-->
    <div id="pullrefresh" class="mui-content mui-scroll-wrapper" style="top:6px;">
        <div class="mui-scroll" >
            <!--数据列表-->

            <ul class="mui-table-view mui-table-view-chevron" v-for="(order,i) in orders">
                <li class="mui-table-view-cell mui-collapse mui-active">
                    <a class="mui-navigate-right">{{order.edittime}}</a>
                    <div class="mui-collapse-content">
                        <!--<div class="mui-row" style="height: 40px;width:100%;" >-->
                            <!--<div class="mui-col-xs-2" style="height:100%;"><img data-preview-src=""  style="width:35px;height: 35px;"></div>-->
                            <!--<div class="mui-col-xs-7">大萨达撒多</div>-->
                            <!--<div class="mui-col-xs-3"><span>x 3</span><span style="position: absolute;right:10px;">大萨达撒</span></div>-->
                        <!--</div>-->
                        <div class="mui-row" style="height: 40px;width:100%;" v-for="info in orders[i].orderGoods">
                            <div class="mui-col-xs-2" style="height:100%;"><img data-preview-src="" :data-preview-group="i" style="width:35px;height: 35px;border-radius:8px; " onerror='this.src=""' :src="downfileurl+info.goodpic.filepath"></div>
                            <div class="mui-col-xs-7">{{info.goodname}}</div>
                            <div class="mui-col-xs-3"><span>x {{info.goodnum}}</span><span style="position: absolute;right:10px;">￥{{info.goodunitprice}}</span></div>
                        </div>
                        <div class="mui-row" style="height: 40px;width:100%;padding-right: 10px;">
                            <div class="mui-col-xs-12" v-if="order.state==1" style="text-align:right;">商家接单中</div>
                            <div class="mui-col-xs-12" v-if="order.state==2" style="text-align:right;">商家备货中</div>
                            <div class="mui-col-xs-12" v-if="order.state==3" style="text-align: right;">买家取货中</div>
                            <div class="mui-col-xs-12" v-if="order.state==4" style="text-align: right;">完成订单</div>
                            <div class="mui-col-xs-12" v-if="order.state==5" style="text-align: right;">商家已取消订单</div>
                            <div class="mui-col-xs-12" v-if="order.state==6" style="text-align: right;">您已取消订单</div>
                        </div>
                        <div class="mui-row" style="height: 40px;width:100%;text-align: right;padding-right: 10px;">

                            <button type="button" v-if="order.state==1"  class="mui-btn mui-btn-primary mui-btn-outlined" v-on:click="cancleorder(order)">取消订单</button>
                            <!--<button type="button" v-if="order.state==2" class="mui-btn mui-btn-primary mui-btn-outlined">取消订单</button>-->
                            <button type="button" v-else-if="order.state==3" class="mui-btn mui-btn-primary mui-btn-outlined" v-on:click="">确认取货</button>

                            <button type="button" v-else-if="order.state>=4" class="mui-btn mui-btn-primary mui-btn-outlined" v-on:click="">再来一单</button>

                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>

</div>
<script type="text/javascript" src="../../js/app/bunsorder/bunsorder.js"></script>
</body>
</html>